# Auther:haijing
# 时间:107-week6

stu_id = [10001,10002,10003,10004,10008,10001,10009,10010,10001]

# 1.copy很重要，防止到后续操作，原始数据不见。
# copy不等于赋值（=）
#stu_id_y = stu_id
#print(stu_id,'\n',stu_id_y)=>[10001, 10002, 10003, 10004, 10008, 10001, 10009, 10010, 10001]
#                             [10001, 10002, 10003, 10004, 10008, 10001, 10009, 10010, 10001]

# 赋值
#stu_id.pop(1)
#print(stu_id,'\n',stu_id_y)

#copy()
#stu_id_y = stu_id.copy()
#stu_id.pop(1)
#print(stu_id,'\n',stu_id_y)==>[10001, 10003, 10004, 10008, 10001, 10009, 10010, 10001]
#                              [10001, 10002, 10003, 10004, 10008, 10001, 10009, 10010, 10001]

#切片实现赋值
#stu_id_y = stu_id[:]
#stu_id.pop(1)
#print(stu_id,'\n',stu_id_y)==>[10001, 10003, 10004, 10008, 10001, 10009, 10010, 10001]
#                              [10001, 10002, 10003, 10004, 10008, 10001, 10009, 10010, 10001]